import os
import csv

from util import recursive_files  

  

  
# 使用函数  
path_pad = 'E:/data/palm_vein/VERA-PAD'
path_real = os.path.join(path_pad, 'Real')

real_files = recursive_files(path_real, path_pad)
csv_contents = []
for file in real_files:
    row = [file, file.replace('Real','Spoof'), '0']
    csv_contents.append(row)

# 打开CSV文件进行写入  
with open('vera_pad_test.csv', mode='w', newline='') as file:  
    writer = csv.writer(file)  
    # 写入数据行  
    for row in csv_contents:  
        writer.writerow(row)